package ThreadDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2025-03-16
 * Time: 23:30
 */


class MyRunable implements Runnable{
    @Override
    public void run() {
        System.out.println("线程运行的代码");
    }
}

public class ThreadDemo3 {
    public static void main(String[] args) {

        Thread t = new Thread(new MyRunable());
        /*Runnable runnable = new MyRunable();
        Thread thread = new Thread(runnable);*/
        //开始线程
        t.start();
    }
}
